package com.ygqh.baby.service.wechat.model.good;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: sunshuo
 * @Date: 2019/5/24 15:21
 * @Version: 1.0
 */
public class GoodSku implements Serializable {

	private static final long serialVersionUID = -8219619114699542066L;

	/**
	 * 物品状态
	 */
	public static final int SKU_ON_SALE = 1; // 在售
	public static final int SKU_IN_STOCK = 2; // 停售
	public static final int SKU_OUT_STOCK = 3; // 售罄

	/**
	 * sku_id		必填
	 */
	private String skuId;

	/**
	 * 物品价格，分为单位		必填
	 */
	private int price;

	/**
	 * 物品原价，单位：分		必填
	 */
	private int originalPrice;

	/**
	 * 非高并发更新数据的场景不建议填写此字段。数据版本号，需按照更新递增		非必填
	 */
	private Integer version;

	/**
	 * 物品状态，1：在售，2：停售，3：售罄		必填
	 */
	private int status;

	/**
	 * sku属性列表		非必填
	 */
	private List<GoodProductAttr> skuAttrList;

	/**
	 * 物品的条形码信息		非必填
	 */
	private GoodBarCode barCodeInfo;

	@JSONField(name = "sku_id")
	public String getSkuId() {
		return skuId;
	}

	public void setSkuId(String skuId) {
		this.skuId = skuId;
	}

	@JSONField(name = "price")
	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	@JSONField(name = "original_price")
	public int getOriginalPrice() {
		return originalPrice;
	}

	public void setOriginalPrice(int originalPrice) {
		this.originalPrice = originalPrice;
	}

	@JSONField(name = "version")
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@JSONField(name = "status")
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@JSONField(name = "sku_attr_list")
	public List<GoodProductAttr> getSkuAttrList() {
		return skuAttrList;
	}

	public void setSkuAttrList(List<GoodProductAttr> skuAttrList) {
		this.skuAttrList = skuAttrList;
	}

	@JSONField(name = "bar_code_info")
	public GoodBarCode getBarCodeInfo() {
		return barCodeInfo;
	}

	public void setBarCodeInfo(GoodBarCode barCodeInfo) {
		this.barCodeInfo = barCodeInfo;
	}

	@Override
	public String toString() {
		return "GoodSku{" +
				"skuId='" + skuId + '\'' +
				", price=" + price +
				", originalPrice=" + originalPrice +
				", version=" + version +
				", status=" + status +
				", skuAttrList=" + skuAttrList +
				", barCodeInfo=" + barCodeInfo +
				'}';
	}
}
